﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true" CodeBehind="ListDoiTac.aspx.cs" Inherits="VINETLIFE.AdminCP.ListDoiTac" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Danh sách Business Partner</h2>
    <div style="float: right; width: 100%;">
        <span style="float: left">Chọn danh mục
            <asp:DropDownList runat="server" ID="ddlPartnerType" AppendDataBoundItems="true" AutoPostBack="true"
                OnSelectedIndexChanged="ddlPartnerType_SelectedIndexChanged" DataValueField="PartnerTypeId" DataTextField="PartnerType">
                <asp:ListItem Text=".: Chọn toàn bộ  :." Value="0"></asp:ListItem>
            </asp:DropDownList>
        </span>
    </div>
    <div class="div-property">
        <asp:GridView ID="grvBusinessPartner" runat="server" AutoGenerateColumns="False" Width="100%"
            CssClass="tstyle2" DataKeyNames="DoiTacID" OnPageIndexChanging="grvBusinessPartner_PageIndexChanging"
            OnRowDeleting="grvBusinessPartner_RowDeleting" AllowPaging="True" PageSize="100" EnableModelValidation="True"
            OnRowCommand="grvBusinessPartner_RowCommand"
            OnSelectedIndexChanged="grvBusinessPartner_SelectedIndexChanged">
            <RowStyle HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField HeaderText="Số TT">
                    <ItemTemplate>
                        <%#Container.DataItemIndex +1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DoiTacID" HeaderText="ID" Visible="False">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="MaDoiTac" HeaderText="Mã đối tác" HeaderStyle-Width="10%">
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="TenDoiTac" HeaderText="Tên">
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Ảnh logo" ItemStyle-Width="9%">
                    <ItemTemplate>
                        <img width="100px" height="70px" src="<%#"/Media/" + (Eval("ImageUrl")).ToString() %>"
                            title="<%#Eval("TenDoiTac")%>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Địa chỉ" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblAddress" Text='<%#Eval("Address") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Điện thoại" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblDienThoai" Text='<%#Eval("DienThoai") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <%-- <asp:BoundField DataField="IsActive" HeaderText="Active" />--%>
                <asp:TemplateField HeaderText="Thao tác">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEdit" runat="server" CommandName="Select" CommandArgument='<%#Eval("DoiTacID") %>'
                            ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                        <asp:ImageButton ID="btnDelete" runat="server" CommandArgument='<%#Eval("DoiTacID") %>'
                            CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
    </div>
    <p style="float:left; margin-top:10px;">
            <a href="DoiTac.aspx" class="button-gg-green">Thêm đối tác </a>
        </p>
</asp:Content>
